//
//  YMAnimation.m
//  LantaiyuanBus
//
//  Created by lantaiyuan on 16/9/14.
//  Copyright © 2016年 lantaiyuan. All rights reserved.

//  动画

#import "YMAnimation.h"

@implementation YMAnimation
+ (void)showView:(UIView*) view{
    CATransition *animation = [CATransition animation];
    animation.type = kCATransitionFade;
    animation.duration = 0.4;
    [view.layer addAnimation:animation forKey:nil];
    view.hidden = NO;
}

+ (void)hideView:(UIView*) view{
    CATransition *animation = [CATransition animation];
    animation.type = kCATransitionFade;
    animation.duration = 0.4;
    [view.layer addAnimation:animation forKey:nil];
    view.hidden = YES;
}
@end
